<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Calendar Demos</title>
	
	<link  href="../jquery.tree.css" rel="stylesheet" type="text/css"  class="view-source"/>
	<link  href="../../../../themes/default/style.css" rel="stylesheet" class="view-source">
	<script src="../../../../scripts/jquery.js" type="text/javascript" class="view-source"></script>
	<script src="../../../../scripts/common.js" type="text/javascript" class="view-source"></script>
	<script src="../../../../scripts/browserfix.js" type="text/javascript"  class="view-source"></script>
	<script src="../../../../scripts/plugins/jquery.json.js" type="text/javascript"></script>
	
	<script src="../jquery.tree.js" type="text/javascript" class="view-source"></script>
	
	<script src="../../demo.js"></script>
	<link href="../../demo.css" rel="stylesheet">

	<style>
		.tree{
			width:200px;
		}
	</style>

<script class="view-source noparse">
//<div id="dyn-tree" class="tree" style="padding: 5px; overflow-y: auto;"></div>
//asyn.tree.demo: select t.id as ID , t.text as TEXT ,t.pid as PARENT_ID ,
//			( select count(1) from tree t1 where t1.pid = t.id ) as has_children
//			 from tree t where t.pid is null
//asyn.tree.demo.child: select id as ID , text as TEXT ,pid as PARENT_ID from tree where 1=1 {? and pid = #parentId#}

	
$(function(){
	$('#dyn-tree').tree({//tree为容器ID
		method : 'post',
		asyn : true, //异步
		rootId  : 'root',
		rootText : '根节点',
		CommandName : 'java.tree.command',
		params : {
			daoBeanName:'dao',
			sqlId : 'asyn.tree.demo',
			childSqlId : 'asyn.tree.demo.child',
			parentId : 'root',
			testId:'1234'
		}
	}) ;
}) ;
</script>
	
</head>

<body>
	<div id='content-dyn' class='demo'>
		<h1></h1>
		<div id="dyn-tree" class="tree" style="padding: 5px; overflow-y: auto;width:240px"></div>
	</div>
</body>
</html>